import { handleActions } from "redux-actions";
import { GET_ALL_TABS } from "../types";
import _ from "lodash";

const initData = {
  tabsRows: [],
};

export const tabs = handleActions(
  {
    [GET_ALL_TABS]: (state, { payload }) => {
      const { tabsRows } = payload;
      return _.assign({}, state, { tabsRows });
    },
  },
  initData
);
